package cn.stylefeng.guns.modular.agv.controller;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.agv.model.params.HikAgvTaskParam;
import cn.stylefeng.guns.modular.agv.model.result.HikAgvTaskResult;
import cn.stylefeng.guns.modular.agv.service.HikAgvTaskService;
import cn.stylefeng.guns.sys.modular.system.service.UserService;
import cn.stylefeng.roses.core.base.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


/**
 * 海康AGV任务单控制器
 *
 * @author zhangzh
 * @Date 2024-06-06 09:51:55
 */
@Controller
@RequestMapping("/biQhAgvTask")
public class BiQhAgvTaskController extends BaseController {

    private String PREFIX = "/bi/biQhAgvTask";

    @Autowired
    private HikAgvTaskService hikAgvTaskService;

    @Autowired
    private UserService userService;

    /**
     * 跳转到主页面
     *
     * @author zhangzh
     * @Date 2024-06-06
     */
    @RequestMapping("")
    public String index() {
        return PREFIX + "/biQhAgvTask.html";
    }

    /**
     * 查询列表
     *
     * @author zhangzh
     * @Date 2024-06-06
     */
    @ResponseBody
    @RequestMapping("/list")
    public LayuiPageInfo list(HikAgvTaskParam hikAgvTaskParam,String condition ) {
        return this.hikAgvTaskService.findPageBySpec(hikAgvTaskParam,condition);
    }


    /**
     *
     * @param hikAgvTaskParam
     * @return
     */
    @ResponseBody
    @RequestMapping("/listAll")
    public List<HikAgvTaskResult> listAll(HikAgvTaskParam hikAgvTaskParam ) {
        return this.hikAgvTaskService.findListBySpec(hikAgvTaskParam);
    }

}


